<?php if(!$noview) {?>
<div class="best index">
<h2><?php echo __('Best Players', true).': '.$fieldTitle;?></h2>
<table cellpadding="0" cellspacing="0">
	<tr>
		<th><?php echo '#';?></th>
		<th><?php echo 'Name';?></th>
		<th><?php echo 'Team';?></th>
		<th><?php echo 'Coach';?></th>
		<th><?php echo 'Race';?></th>
		<th><?php echo 'Type';?></th>
		<th><?php echo $fieldName;?></th>
		<th><?php echo 'Xp';?></th>
		<th><?php echo 'Val';?></th>
	</tr>
	<?php
	$i = 0;
	foreach ($statisticsSeasonPlayers as $statisticsSeasonPlayer):
	$class = null;
	if((!empty($statisticsSeasonPlayer['Player']['Team']['Coach']))
			&& $statisticsSeasonPlayer['Player']['Team']['Coach']['ID'] == $coach_id) {
		$class = ' class="mine';
	} else {
		$class = ' class="';
	}
	if ($i++ % 2 == 0) {
		$class .= ' altrow"';
	} else {
		$class .= '"';
	}
	?>
	<tr <?php echo $class;?>>
		<td><?php echo $i; ?></td>
		<td nowrap="nowrap" ><?php echo $html->link($statisticsSeasonPlayer['Player']['strName'], array('controller' => 'players', 'action' => 'view', $statisticsSeasonPlayer['Player']['ID'])); ?>&nbsp;</td>
		<td nowrap="nowrap"><?php echo $html->link($statisticsSeasonPlayer['Player']['Team']['strName'], array('controller' => 'teams', 'action' => 'view', $statisticsSeasonPlayer['Player']['Team']['ID'])); ?>&nbsp;</td>
		<td nowrap="nowrap"><?php echo $html->link($statisticsSeasonPlayer['Player']['Team']['Coach']['strName'], array('controller' => 'coaches', 'action' => 'view', $statisticsSeasonPlayer['Player']['Team']['Coach']['ID'])); ?>&nbsp;</td>
		<td nowrap="nowrap"><?php echo $html->link($statisticsSeasonPlayer['Player']['Team']['Race']['LocalizedString'][$locale], array('controller' => 'races', 'action' => 'view', $statisticsSeasonPlayer['Player']['Team']['Race']['ID'])); ?>&nbsp;</td>
		<td nowrap="nowrap"><?php echo $html->link($statisticsSeasonPlayer['Player']['PlayerType']['LocalizedString'][$locale], array('controller' => 'player_types', 'action' => 'view', $statisticsSeasonPlayer['Player']['PlayerType']['ID'])); ?>&nbsp;</td>
		<td><?php echo $statisticsSeasonPlayer['StatisticsSeasonPlayer'][$field]; ?>&nbsp;</td>
		<td><?php echo $statisticsSeasonPlayer['Player']['iExperience']; ?>&nbsp;</td>
		<td><?php echo $statisticsSeasonPlayer['Player']['iValue']; ?>&nbsp;</td>
	</tr>
	<?php endforeach; ?>
</table>
</div>
<div class="actions">
	<ul>
		<li><?php echo $html->link(__('Most TDs', true), array('action' => 'get_bestplayers', 'td'));?></li>
		<li><?php echo $html->link(__('Most Passes', true), array('action' => 'get_bestplayers', 'pa'));?></li>
		<li><?php echo $html->link(__('Most Meter Passing', true), array('action' => 'get_bestplayers', 'mp'));?></li>
		<li><?php echo $html->link(__('Most Interceptions', true), array('action' => 'get_bestplayers', 'int'));?></li>
		<li><?php echo $html->link(__('Best Runners', true), array('action' => 'get_bestplayers', 'mr'));?></li>
		<li><?php echo $html->link(__('Best Catchers', true), array('action' => 'get_bestplayers', 'ca'));?></li>
		<li><?php echo $html->link(__('Most Injuries', true), array('action' => 'get_bestplayers', 'inj'));?></li>
		<li><?php echo $html->link(__('Most Casualties', true), array('action' => 'get_bestplayers', 'cas'));?></li>
		<li><?php echo $html->link(__('Most Deads', true), array('action' => 'get_bestplayers', 'dd'));?></li>
		<li><?php echo $html->link(__('Most Sustained Injuries', true), array('action' => 'get_bestplayers', 'sinj'));?></li>
		<li><?php echo $html->link(__('Most Sustained Casualties', true), array('action' => 'get_bestplayers', 'scas'));?></li>
	</ul>
</div>
<?php } ?>